home *** CD-ROM | disk | FTP | other *** search
- package netscape.ldap;
-
- public abstract class LDAPSchemaElement {
- public static final int unknown = 0;
- public static final int cis = 1;
- public static final int binary = 2;
- public static final int telephone = 3;
- public static final int ces = 4;
- // $FF: renamed from: dn int
- public static final int field_0 = 5;
- public static final int integer = 6;
- protected static final String cisString = "1.3.6.1.4.1.1466.115.121.1.15";
- protected static final String binaryString = "1.3.6.1.4.1.1466.115.121.1.5";
- protected static final String telephoneString = "1.3.6.1.4.1.1466.115.121.1.50";
- protected static final String cesString = "1.3.6.1.4.1.1466.115.121.1.26";
- protected static final String intString = "1.3.6.1.4.1.1466.115.121.1.27";
- protected static final String dnString = "1.3.6.1.4.1.1466.115.121.1.12";
- protected String oid = "";
- protected String name = "";
- protected String description = "";
- protected String attrName;
-
- protected LDAPSchemaElement() {
- }
-
- protected LDAPSchemaElement(String var1, String var2, String var3) {
- this.name = var1;
- this.oid = var2;
- this.description = var3;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getOID() {
- return this.oid;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- protected void update(LDAPConnection var1, int var2, LDAPAttribute var3) throws LDAPException {
- LDAPAttribute[] var4 = new LDAPAttribute[]{var3};
- this.update(var1, var2, var4);
- }
-
- protected void update(LDAPConnection var1, int var2, LDAPAttribute[] var3) throws LDAPException {
- LDAPModificationSet var4 = new LDAPModificationSet();
-
- for(int var5 = 0; var5 < var3.length; ++var5) {
- var4.add(var2, var3[var5]);
- }
-
- var1.modify("cn=schema", var4);
- }
-
- protected void update(LDAPConnection var1, int var2, String var3) throws LDAPException {
- LDAPAttribute var4 = new LDAPAttribute(var3, this.getValue());
- this.update(var1, var2, var4);
- }
-
- public void add(LDAPConnection var1) throws LDAPException {
- this.update(var1, 0, (String)this.attrName);
- }
-
- public void remove(LDAPConnection var1) throws LDAPException {
- this.update(var1, 1, (String)this.attrName);
- }
-
- public abstract String getValue();
- }
-